const orderData = [
    {
        date: '2023-02-27',
        score: 50,
        returnOrder: 2,
    },
    {
        date: '2023-02-27',
        score: 50,
        repeatNum: 2,
    },
];

// console.log(orderData)

function getDataList() {
    const orderData = [];
    for (let i = 1; i <= 30; i++) {
        orderData.push({
            date: `2024-02-${i > 9 ? i : '0' + i}`,
            score: randomLowerBUpper(50, 100),
            repeatNum: randomLowerBUpper(5, 10),
        });
    }
    return orderData;
}

function randomLowerBUpper(lower, upper) {
    const choice = upper - lower + 1;
    return Math.floor(Math.random() * choice + lower);
}

module.exports = getDataList;
